<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>批量默认选中</title>
</head>
<body>
<script type="text/javascript" src="../jquery/jquery-3.5.1.js"></script>
<script type="text/javascript">
  $(function (){
    $(":radio").val(["radio1"]);                             //默认选中单选按钮里面的radio1
    $(":checkbox").val(["checkbox1","checkbox2"]);           //默认选中多选按钮里面的checkbox1和checkbox2
    $("#multiple").val(["mul1","mul3"]);                     //默认选中多选下拉里面的mul1和mul3
    $("#single").val(["sin1"]);                             //默认选中下拉单选中的sin1
  });
</script>
单选：
<input name="radio" type="radio" value="radio1">radio1
<input name="radio" type="radio" value="radio2">radio2
<br>
多选：
<input name="checkbox" type="checkbox" value="checkbox1">checkbox1
<input name="checkbox" type="checkbox" value="checkbox2">checkbox2
<input name="checkbox" type="checkbox" value="checkbox3">checkbox3
<br>
下拉多选：
<select id="multiple" multiple="multiple" size="4">
  <option value="mul1">mul1</option>
  <option value="mul2">mul2</option>
  <option value="mul3">mul3</option>
  <option value="mul4">mul4</option>
</select>
<br>
下拉单选：
<select id="single">
  <option value="sin1">sin1</option>
  <option value="sin2">sin2</option>
  <option value="sin3">sin3</option>
</select>
<br>
</body>
</html>